<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header_page"); ?>
<div class="layui-warp">
  <?php if(defined('IN_ADMIN')  && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=a054da9759acc78be965cc5cb3d048e3&action=lists&moreinfo=1&catid=%24catid&num=30&order=id+DESC&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">修改</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$pagesize = 30;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('moreinfo'=>'1','catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($content_total, $page, $pagesize, $urlrule);$data = $content_tag->lists(array('moreinfo'=>'1','catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));}?>
  <div id="masonry" class="container-fluid">
    <?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
    <div class="layui-box">
      <div class="layui-actions">
        <a class="layui-thumb" href="<?php echo $r['url'];?>" target="_blank"><img lay-src="<?php echo $r['thumb'];?>?x-oss-process=style/midpic" alt="<?php echo $r['title'];?>" /></a>
        <div class="layui-infos">
          <?php $enjoynum = isset($r['digg']) ? $r['digg'] : 0;?>
          <div class="layui-digg"><i class="layui-heart"></i><span class="layui-badge"><?php echo $enjoynum;?>人喜欢</span></div>
          <div class="layui-type"><i class="layui-icon">&#xe857;</i><span class="layui-badge"><a href="<?php echo $CATEGORYS[$r['catid']]['url'];?>" target="_blank"><?php echo $CATEGORYS[$r['catid']]['catname'];?></a></span></div>
        </div>  
      </div>
      <div class="layui-stats">
        <div class="layui-tips">
          <?php $picnum = count(json_decode($r[pictureurls], true));?>
          <div class="layui-piccount"><i class="layui-icon">&#xe64a;</i><span class="layui-badge layui-count" data-num="<?php echo $picnum;?>"><?php echo $picnum;?>P</span></div>
          <div class="layui-posttime"><i class="layui-icon">&#xe609;</i><span class="layui-badge layui-date"><?php echo date("Y-m-d", $r[inputtime]);?></span></div>
        </div>
        <div class="layui-title">
          <h2><a href="<?php echo $r['url'];?>" title="<?php echo $r['title'];?>" target="_blank"><?php echo $r['title'];?></a></h2>
        </div>
      </div>
    </div>
    <?php $n++;}unset($n); ?>
  </div>
  <div class="layui-pagebox">
    <div class="layui-laypage"><?php echo $pages;?></div>
  </div>
  <?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<script type="text/javascript" src="<?php echo LAYUI_PATH;?>uaredirect.js"></script>
<script type="text/javascript">uaredirect("http://m.chunmeitu.com/cat/<?php echo $catid;?>.html");</script>
<script>
layui.use('flow', function(){
  var flow = layui.flow;
  flow.lazyimg(); 
});
</script>
<?php include template("content","footer"); ?>
